package com.yiboshi.rehrs.util;

import org.apache.commons.lang3.StringUtils;

/**
 * @author jack 2025/2/18
 */
public class StrUtils {

    public static boolean isNotBlank(String value) {
        return StringUtils.isNotBlank(value);
    }

    public static boolean isBlank(String value) {
        return StringUtils.isBlank(value);
    }

    public static String transferNull(String value) {
        return StringUtils.isEmpty(value) ? "" : value;
    }

    public static String swapEmpty(String value) {
        return value == null ? "" : value;
    }

    public static String concat(String separate, String... values) {
        if (values == null || values.length == 0) {
            return "";
        }
        StringBuilder stringBuilder = new StringBuilder();
        separate = transferNull(separate);
        for (String value : values) {
            stringBuilder.append(separate).append(transferNull(value));
        }
        return stringBuilder.toString();
    }




}
